package com.tt.fashionWebSite.dao.jpa;

import com.tt.fashionWebSite.dao.LoaiDanhMucDao;
import com.tt.fashionWebSite.domain.LoaiDanhMuc;
import com.tt.fashionWebSite.domain.LoaiDanhMucSanPham;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by PC on 11/28/14.
 */
@Repository("loaiDanhMuc")
public class LoaiDanhMucJpaDao extends GenericJpaDao<LoaiDanhMuc,String> implements LoaiDanhMucDao {
    public LoaiDanhMucJpaDao(){
        super(LoaiDanhMuc.class);
    }

    @Override
    public List<LoaiDanhMuc> getAllProductCategory(){
        return getEntityManager().createNamedQuery(LoaiDanhMuc.GET_PRODUCT_CATEGORY, LoaiDanhMuc.class).getResultList();
    }
}
